﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DLTN.Entities;
using DLTN.Data;
using System.Data;
using System.Net.Mail;
using System.Text;

public partial class Media_Controls_ControlMediaGroupContent : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            HienThiTinTuc();
            HienThiSuKien();
            HienThiThongCaoBaoChi();
            HienThiDangKyNhanNewLetter();
        }
    }

    private void HienThiTinTuc()
    {
        string strHTML = "";
        int TotalRows = 0;
        string WhereClause = "1=1";
        TList<SubChuyenMuc> TList_SubChuyenMuc = DataRepository.SubChuyenMucProvider.GetPaged("TenSubChuyenMuc like N'%" + Common.TinTuc + "%'", "ID", 0, 0, out TotalRows);
        if (TList_SubChuyenMuc.Count > 0)
        {
            WhereClause += " and trangthai =1 and IdSubChuyenMuc in (select Id from SubChuyenMuc where Id = " + TList_SubChuyenMuc[0].Id + " )";
            TList<ChuyenMuc> TList_ChuyenMuc = DataRepository.ChuyenMucProvider.GetPaged(WhereClause, "NgayCapNhat DESC", 0, 5, out TotalRows);
            if (TList_ChuyenMuc.Count > 0)
            {
                int j = 1;
                //Phần liệt kê
                for (int i = 0; i <= TList_ChuyenMuc.Count - 1; i++)
                {
                    strHTML += "<div id=\"tin-tuc-content-" + j + "\">";
                    strHTML += "<div>";
                    strHTML += "<div style=\"float: left; margin-top: 5px;\"><div style=\"float: left; height:33px;\">";
                    strHTML += "<img src=\"images/dltn/caydua.png\"></div>";
                    strHTML += "<div style=\"float: right; margin-left: 5px;\"><div class=\"chumenunhomtour\"><a class=\"linkGroupContent\"  href='SubChuyenMuc/" + TList_ChuyenMuc[0].IdSubChuyenMuc + "/" + TList_SubChuyenMuc[0].IdLoaiChuyenMuc + "/" + GetTieuDe(TList_SubChuyenMuc[0].TenSubChuyenMuc) + ".aspx'>" + Common.TinTuc.ToUpper() + "</a></div>";
                    strHTML += "<div class=\"date-time\">" + Common.StandardStringjquery(TList_ChuyenMuc[i].NgayCapNhat.ToString("''dd/MM/yyyy, HH:mm 'GMT+7'")) + "</div></div></div>";
                    strHTML += "<a href=\"ChuyenMuc/" + TList_ChuyenMuc[i].Id + "/" + TList_ChuyenMuc[i].IdSubChuyenMuc + "/" + GetTieuDe(TList_ChuyenMuc[i].TieuDe) + ".aspx" + "\">";
                    strHTML += "<img class='radius' src=\"upload/ChuyenMuc/" + TList_ChuyenMuc[i].AnhDaiDien + "\" border=\"0\" width=\"300\" height=\"150\"></a></div>";
                    strHTML += "<div style=\"text-align: justify; height: 90px; font-family: Tahoma; font-size:13px; margin-top: 3px\"><a href=\"ChuyenMuc/" + TList_ChuyenMuc[i].Id + "/" + TList_ChuyenMuc[i].IdSubChuyenMuc + "/" + GetTieuDe(TList_ChuyenMuc[i].TieuDe) + ".aspx" + "\" class=\"seemoreText\"><span style=\"font-weight: bold; color: red; font-family: Tahoma; font-size:14px;\">" + TList_ChuyenMuc[i].TieuDe + "</span></a>";

                    if (TList_ChuyenMuc[i].TieuDe.Length > 40)
                        strHTML += "</span>: " + (TList_ChuyenMuc[i].TomTat.ToString().Length > 130 ? TList_ChuyenMuc[i].TomTat.Substring(0, 130) + "..." : TList_ChuyenMuc[i].TomTat.ToString()) + "</div>";
                    else
                        strHTML += "</span>: " + (TList_ChuyenMuc[i].TomTat.ToString().Length > 190 ? TList_ChuyenMuc[i].TomTat.Substring(0, 190) + "..." : TList_ChuyenMuc[i].TomTat.ToString()) + "</div>";
                    
                    strHTML += "<div style=\"margin-top: -5px; padding-left: 207px\"><div class=\"seemoreDiv\">";
                    strHTML += "<a href=\"ChuyenMuc/" + TList_ChuyenMuc[i].Id + "/" + TList_ChuyenMuc[i].IdSubChuyenMuc + "/" + GetTieuDe(TList_ChuyenMuc[i].TieuDe) + ".aspx" + "\" class=\"seemoreText\"><div style=\"padding-top: 2px; padding-left: 2px\">Xem tiếp</div></a>";
                    strHTML += "</div></div></div>";
                    j++;
                }
            }
            else
            {
                strHTML += "<div style=\"float: left; margin-top: 5px;\"><div style=\"float: left\">";
                strHTML += "<img src=\"images/dltn/caydua.png\"></div>";
                strHTML += "<div style=\"float: right; margin-left: 5px;\"><div class=\"chumenunhomtour\">" + Common.TinTuc.ToUpper() + "</div>";
                strHTML += "<div class=\"date-time\"></div></div></div>";
            }
            lithotTour.Text = strHTML;
        }
    }

    /// <summary>
    /// Sự kiện
    /// </summary>
    /// <param name="Char"></param>
    /// <returns></returns>
    private void HienThiSuKien()
    {
        string strHTML = "";
        int TotalRows = 0;
        string WhereClause = "1=1";
        TList<SubChuyenMuc> TList_SubChuyenMuc = DataRepository.SubChuyenMucProvider.GetPaged("TenSubChuyenMuc like N'%" + Common.SuKien + "%'", "ID", 0, 0, out TotalRows);
        if (TList_SubChuyenMuc.Count > 0)
        {
            WhereClause += " and trangthai =1 and IdSubChuyenMuc in (select Id from SubChuyenMuc where Id = " + TList_SubChuyenMuc[0].Id + " )";
            TList<ChuyenMuc> TList_ChuyenMuc = DataRepository.ChuyenMucProvider.GetPaged(WhereClause, "NgayCapNhat DESC", 0, 5, out TotalRows);
            if (TList_ChuyenMuc.Count > 0)
            {
                int j = 1;
                //Phần liệt kê
                for (int i = 0; i <= TList_ChuyenMuc.Count - 1; i++)
                {
                    strHTML += "<div id=\"su-kien-content-" + j + "\">";
                    strHTML += "<div>";
                    strHTML += "<div style=\"float: left; margin-top: 5px;\"><div style=\"float: left; height:33px;\">";
                    strHTML += "<img src=\"images/dltn/specialTour.png\"></div>";
                    strHTML += "<div style=\"float: right; margin-left: 5px;\"><div class=\"chumenunhomtour\"><a class=\"linkGroupContent\"  href='SubChuyenMuc/" + TList_ChuyenMuc[0].IdSubChuyenMuc + "/" + TList_SubChuyenMuc[0].IdLoaiChuyenMuc + "/" + GetTieuDe(TList_SubChuyenMuc[0].TenSubChuyenMuc) + ".aspx'>" + Common.SuKien.ToUpper() + "</a></div>";
                    strHTML += "<div class=\"date-time\">" + Common.StandardStringjquery(TList_ChuyenMuc[i].NgayCapNhat.ToString("''dd/MM/yyyy, HH:mm 'GMT+7'")) + "</div></div></div>";
                    strHTML += "<a href=\"ChuyenMuc/" + TList_ChuyenMuc[i].Id + "/" + TList_ChuyenMuc[i].IdSubChuyenMuc + "/" + GetTieuDe(TList_ChuyenMuc[i].TieuDe) + ".aspx" + "\">";
                    strHTML += "<img class='radius' src=\"upload/ChuyenMuc/" + TList_ChuyenMuc[i].AnhDaiDien + "\" border=\"0\" width=\"300\" height=\"150\"></a></div>";
                    strHTML += "<div style=\"text-align: justify; height: 90px; font-family: Tahoma; font-size:13px; margin-top: 3px\"><a href=\"ChuyenMuc/" + TList_ChuyenMuc[i].Id + "/" + TList_ChuyenMuc[i].IdSubChuyenMuc + "/" + GetTieuDe(TList_ChuyenMuc[i].TieuDe) + ".aspx" + "\" class=\"seemoreText\"><span style=\"font-weight: bold; color: red; font-family: Tahoma; font-size:14px;\">" + TList_ChuyenMuc[i].TieuDe + "</span></a>";

                    if (TList_ChuyenMuc[i].TieuDe.Length > 60)
                        strHTML += "</span>: " + (TList_ChuyenMuc[i].TomTat.ToString().Length > 150 ? TList_ChuyenMuc[i].TomTat.Substring(0, 150) + "..." : TList_ChuyenMuc[i].TomTat.ToString()) + "</div>";
                    else
                        strHTML += "</span>: " + (TList_ChuyenMuc[i].TomTat.ToString().Length > 190 ? TList_ChuyenMuc[i].TomTat.Substring(0, 190) + "..." : TList_ChuyenMuc[i].TomTat.ToString()) + "</div>";
                    
                    strHTML += "<div style=\"margin-top: -5px; padding-left: 207px\"><div class=\"seemoreDiv\">";
                    strHTML += "<a href=\"ChuyenMuc/" + TList_ChuyenMuc[i].Id + "/" + TList_ChuyenMuc[i].IdSubChuyenMuc + "/" + GetTieuDe(TList_ChuyenMuc[i].TieuDe) + ".aspx" + "\" class=\"seemoreText\"><div style=\"padding-top: 2px; padding-left: 2px\">Xem tiếp</div></a>";
                    strHTML += "</div></div></div>";
                    j++;
                }
            }
            else
            {
                strHTML += "<div style=\"float: left; margin-top: 5px;\"><div style=\"float: left\">";
                strHTML += "<img src=\"images/dltn/specialTour.png\"></div>";
                strHTML += "<div style=\"float: right; margin-left: 5px;\"><div class=\"chumenunhomtour\">" + Common.SuKien.ToUpper() + "</div>";
                strHTML += "<div class=\"date-time\"></div></div></div>";
            }
            litTrongNuocTour.Text = strHTML;
        }
    }

    /// <summary>
    /// Thong cao bao chi
    /// </summary>
    /// <param name="Char"></param>
    /// <returns></returns>
    private void HienThiThongCaoBaoChi()
    {
        string strHTML = "";
        int TotalRows = 0;
        string WhereClause = "1=1";
        TList<SubChuyenMuc> TList_SubChuyenMuc = DataRepository.SubChuyenMucProvider.GetPaged("TenSubChuyenMuc like N'%" + Common.ThongCaoBaoChi + "%'", "ID", 0, 0, out TotalRows);
        if (TList_SubChuyenMuc.Count > 0)
        {
            WhereClause += " and trangthai =1 and IdSubChuyenMuc in (select Id from SubChuyenMuc where Id = " + TList_SubChuyenMuc[0].Id + " )";
            TList<ChuyenMuc> TList_ChuyenMuc = DataRepository.ChuyenMucProvider.GetPaged(WhereClause, "NgayCapNhat DESC", 0, 5, out TotalRows);
            if (TList_ChuyenMuc.Count > 0)
            {
                int j = 1;
                //Phần liệt kê
                for (int i = 0; i <= TList_ChuyenMuc.Count - 1; i++)
                {
                    strHTML += "<div id=\"thong-cao-bao-chi-content-" + j + "\">";
                    strHTML += "<div>";
                    strHTML += "<div style=\"float: left; margin-top: 5px;\"><div style=\"float: left; height:33px;\">";
                    strHTML += "<img src=\"images/dltn/internationTour.png\"></div>";
                    strHTML += "<div style=\"float: right; margin-left: 5px;\"><div class=\"chumenunhomtour\"><a class=\"linkGroupContent\"  href='SubChuyenMuc/" + TList_ChuyenMuc[0].IdSubChuyenMuc + "/" + TList_SubChuyenMuc[0].IdLoaiChuyenMuc + "/" + GetTieuDe(TList_SubChuyenMuc[0].TenSubChuyenMuc) + ".aspx'>" + Common.ThongCaoBaoChi.ToUpper() + "</a></div>";
                    strHTML += "<div class=\"date-time\">" + Common.StandardStringjquery(TList_ChuyenMuc[i].NgayCapNhat.ToString("''dd/MM/yyyy, HH:mm 'GMT+7'")) + "</div></div></div>";
                    strHTML += "<a href=\"ChuyenMuc/" + TList_ChuyenMuc[i].Id + "/" + TList_ChuyenMuc[i].IdSubChuyenMuc + "/" + GetTieuDe(TList_ChuyenMuc[i].TieuDe) + ".aspx" + "\">";
                    strHTML += "<img class='radius' src=\"upload/ChuyenMuc/" + TList_ChuyenMuc[i].AnhDaiDien + "\" border=\"0\" width=\"300\" height=\"150\"></a></div>";
                    strHTML += "<div style=\"text-align: justify; height: 90px; font-family: Tahoma; font-size:13px; margin-top: 3px\"><a href=\"ChuyenMuc/" + TList_ChuyenMuc[i].Id + "/" + TList_ChuyenMuc[i].IdSubChuyenMuc + "/" + GetTieuDe(TList_ChuyenMuc[i].TieuDe) + ".aspx" + "\" class=\"seemoreText\"><span style=\"font-weight: bold; color: red; font-family: Tahoma; font-size:14px;\">" + TList_ChuyenMuc[i].TieuDe + "</span></a>";

                    if (TList_ChuyenMuc[i].TieuDe.Length > 60)
                        strHTML += "</span>: " + (TList_ChuyenMuc[i].TomTat.ToString().Length > 150 ? TList_ChuyenMuc[i].TomTat.Substring(0, 150) + "..." : TList_ChuyenMuc[i].TomTat.ToString()) + "</div>";
                    else
                        strHTML += "</span>: " + (TList_ChuyenMuc[i].TomTat.ToString().Length > 190 ? TList_ChuyenMuc[i].TomTat.Substring(0, 190) + "..." : TList_ChuyenMuc[i].TomTat.ToString()) + "</div>";
                    
                    strHTML += "<div style=\"margin-top: -5px; padding-left: 207px\"><div class=\"seemoreDiv\">";
                    strHTML += "<a href=\"ChuyenMuc/" + TList_ChuyenMuc[i].Id + "/" + TList_ChuyenMuc[i].IdSubChuyenMuc + "/" + GetTieuDe(TList_ChuyenMuc[i].TieuDe) + ".aspx" + "\" class=\"seemoreText\"><div style=\"padding-top: 2px; padding-left: 2px\">Xem tiếp</div></a>";
                    strHTML += "</div></div></div>";
                    j++;
                }
            }
            else
            {
                strHTML += "<div style=\"float: left; margin-top: 5px;\"><div style=\"float: left\">";
                strHTML += "<img src=\"images/dltn/internationTour.png\"></div>";
                strHTML += "<div style=\"float: right; margin-left: 5px;\"><div class=\"chumenunhomtour\">" + Common.ThongCaoBaoChi.ToUpper() + "</div>";
                strHTML += "<div class=\"date-time\"></div></div></div>";
            }
            litDocTour.Text = strHTML;
        }
    }

    /// <summary>
    /// Dang ky nhan New letter
    /// </summary>
    /// <param name="Char"></param>
    /// <returns></returns>
    private void HienThiDangKyNhanNewLetter()
    {
        string strHTML = "";
        int TotalRows = 0;
        string WhereClause = "1=1";
        TList<SubChuyenMuc> TList_SubChuyenMuc = DataRepository.SubChuyenMucProvider.GetPaged("TenSubChuyenMuc like N'%" + Common.DangKyNhanNewLetter + "%'", "ID", 0, 0, out TotalRows);
        if (TList_SubChuyenMuc.Count > 0)
        {
            WhereClause += " and trangthai =1 and IdSubChuyenMuc in (select Id from SubChuyenMuc where Id = " + TList_SubChuyenMuc[0].Id + " )";
            TList<ChuyenMuc> TList_ChuyenMuc = DataRepository.ChuyenMucProvider.GetPaged(WhereClause, "NgayCapNhat DESC", 0, 5, out TotalRows);
            if (TList_ChuyenMuc.Count > 0)
            {
                int j = 1;
                //Phần liệt kê
                for (int i = 0; i <= TList_ChuyenMuc.Count - 1; i++)
                {
                    strHTML += "<div id=\"dang-ky-nhan-new-letter-content-" + j + "\">";
                    strHTML += "<div>";
                    strHTML += "<div style=\"float: left; margin-top: 5px;\"><div style=\"float: left; height:33px;\">";
                    strHTML += "<img src=\"images/dltn/caydu.png\"></div>";
                    strHTML += "<div style=\"float: right; margin-left: 5px;\"><div class=\"chumenunhomtour\"><a class=\"linkGroupContent\"  href='SubChuyenMuc/" + TList_ChuyenMuc[0].IdSubChuyenMuc + "/" + TList_SubChuyenMuc[0].IdLoaiChuyenMuc + "/" + GetTieuDe(TList_SubChuyenMuc[0].TenSubChuyenMuc) + ".aspx'>" + Common.DangKyNhanNewLetter.ToUpper() + "</a></div>";
                    strHTML += "<div class=\"date-time\">" + Common.StandardStringjquery(TList_ChuyenMuc[i].NgayCapNhat.ToString("''dd/MM/yyyy, HH:mm 'GMT+7'")) + "</div></div></div>";
                    strHTML += "<a href=\"ChuyenMuc/" + TList_ChuyenMuc[i].Id + "/" + TList_ChuyenMuc[i].IdSubChuyenMuc + "/" + GetTieuDe(TList_ChuyenMuc[i].TieuDe) + ".aspx" + "\">";
                    strHTML += "<img class='radius' src=\"upload/ChuyenMuc/" + TList_ChuyenMuc[i].AnhDaiDien + "\" border=\"0\" width=\"300\" height=\"150\"></a></div>";
                    strHTML += "<div style=\"text-align: justify; height: 90px; font-family: Tahoma; font-size:13px; margin-top: 3px\"><a href=\"Tour/" + TList_ChuyenMuc[i].Id + "_" + TList_ChuyenMuc[i].IdSubChuyenMuc + "_" + GetTieuDe(TList_ChuyenMuc[i].TieuDe) + ".aspx" + "\" class=\"seemoreText\"><span style=\"font-weight: bold; color: red; font-family: Tahoma; font-size:14px;\">" + TList_ChuyenMuc[i].TieuDe + "</span></a>";
                    
                    if(TList_ChuyenMuc[i].TieuDe.Length > 60)
                        strHTML += "</span>: " + (TList_ChuyenMuc[i].TomTat.ToString().Length > 150 ? TList_ChuyenMuc[i].TomTat.Substring(0, 150) + "..." : TList_ChuyenMuc[i].TomTat.ToString()) + "</div>";
                    else
                        strHTML += "</span>: " + (TList_ChuyenMuc[i].TomTat.ToString().Length > 190 ? TList_ChuyenMuc[i].TomTat.Substring(0, 190) + "..." : TList_ChuyenMuc[i].TomTat.ToString()) + "</div>";
                    
                    strHTML += "<div style=\"margin-top: -5px; padding-left: 207px\"><div class=\"seemoreDiv\">";
                    strHTML += "<a href=\"Tour/" + TList_ChuyenMuc[i].Id + "/" + TList_ChuyenMuc[i].IdSubChuyenMuc + "/" + GetTieuDe(TList_ChuyenMuc[i].TieuDe) + ".aspx" + "\" class=\"seemoreText\"><div style=\"padding-top: 2px; padding-left: 2px\">Xem tiếp</div></a>";
                    strHTML += "</div></div></div>";
                    j++;
                }
            }
            else
            {
                strHTML += "<div style=\"float: left; margin-top: 5px;\"><div style=\"float: left\">";
                strHTML += "<img src=\"images/dltn/caydu.png\"></div>";
                strHTML += "<div style=\"float: right; margin-left: 5px;\"><div class=\"chumenunhomtour\">" + Common.DangKyNhanNewLetter.ToUpper() + "</div>";
                
            }
            
        }
    }

    public string GetTieuDe(object Char)
    {
        string s = Char.ToString();
        return Common.ConvertToUnSign(s);
    }
    /// <summary>
    /// Xử lý khi bấm nút gửi
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btGui_Click(object sender, EventArgs e)
    {
        guiMail();
        tbHoten.Text = "";
        tbEmail.Text = "";
    }

    #region Gui mail

    private void guiMail()
    {
        TList<CauHinhMail> TList_CauHinhMail = DataRepository.CauHinhMailProvider.GetAll();
        if (TList_CauHinhMail.Count > 0)
        {
            MailMessage objEmail = new MailMessage();
            objEmail.From = new MailAddress(TList_CauHinhMail[0].TenMail);

            //Chèn loại email cần đến ở đây            
            objEmail.To.Add("pr@vyctour.com");            
            objEmail.To.Add(tbEmail.Text);

            objEmail.Subject = "[VYC] Đăng ký nhận tin tức từ VYC "; // Tiêu đề bài viết
            objEmail.SubjectEncoding = Encoding.UTF8;
            objEmail.BodyEncoding = Encoding.UTF8; //Chuyển bảng mã
            objEmail.Body = NoiDungMail(); //Chưa nội dung mail
            objEmail.IsBodyHtml = true;
            SmtpClient smtp;
            if (TList_CauHinhMail[0].TrangThai == true)
            {
                smtp = new SmtpClient() { Host = "smtp.gmail.com", Port = 587, EnableSsl = true, Credentials = new System.Net.NetworkCredential(TList_CauHinhMail[0].TenMail, TList_CauHinhMail[0].MatKhau) };
            }
            else
            {
                smtp = new SmtpClient() { Host = "smtp.live.com", Port = 587, EnableSsl = true, Credentials = new System.Net.NetworkCredential(TList_CauHinhMail[0].TenMail, TList_CauHinhMail[0].MatKhau) };
            }
            smtp.Send(objEmail);
            //WebMessage.Show("Chúng tôi đã gửi nội dung bài viết đến Thư điện tử cho bạn!");
            //Page.ClientScript.RegisterStartupScript(this.GetType(), "redirectMe", "alert('Chúng tôi đã gửi nội dung bài viết đến Thư điện tử cho bạn.\\n!')");
            //gọi đoạn javascrip để đóng cửa sổ lại

        }
    }

    private string NoiDungMail()
    {
        //
        string NoiDung = "";
        // Email template
        NoiDung = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional //EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
        NoiDung += "<html>";
        NoiDung += "<head>";
        NoiDung += "<head>";
        NoiDung += "<style type=\"text/css\">";
        NoiDung += "*{margin: 0; padding: 0;}";
        NoiDung += "body{font-size: 12px; font-family: Tahoma, Arial;}";
        NoiDung += ".container{margin: 0 auto; width: 600px; height: 350px; background-color: #ffffff; border: 1px solid #000; padding: 1px 5px;}";
        NoiDung += ".social{width: 100%; height: 20px; background-color: #BB0009;}";
        NoiDung += "a{color: #fff; font-size: 11px; text-decoration: none;}";
        NoiDung += ".logo{height: 80px; width: 100%;}";
        NoiDung += ".title{height: 50px; width: 100%;}";
        NoiDung += ".content{height: 100px; width: 100%;}";
        NoiDung += ".footer{height: 50px; width: 100%; background-color: #BB0009; padding: 10px 2px; color: #ffffff;}";
        NoiDung += "span.indam{font-weight: bold; padding: 3px 0px;}";
        NoiDung += "</style>";
        NoiDung += "</head>";

        NoiDung += "<body>";
        NoiDung += "<div class=\"container\">";
        NoiDung += "<div class=\"social\">";
        NoiDung += "<img src=\"https://img.createsend1.com/img/templatebuilder/like-glyph.png\">";
        NoiDung += "<a href=\"http://www.facebook.com/VycTravel\">http://www.facebook.com/VycTravel</a>";
        NoiDung += "</div>";
        NoiDung += "<div class=\"logo\">";
        NoiDung += "<img src=\"http://vyctour.com/Images/dltn/new-logo.png\" width=\"80px\" height=\"80px\">";
        NoiDung += "</div>";
        NoiDung += "<div class=\"title\"><h1>Đăng ký nhận mail</h1></div>";
        NoiDung += "<div class=\"content\">";
        NoiDung += "<p><span class=\"indam\">Họ và tên :</span> <span>" + tbHoten.Text + "</span></p>";
        NoiDung += "<p><span class=\"indam\">Email :</span> <span>" + tbEmail.Text + "</span></p>";       
        NoiDung += "</div>";
        NoiDung += "<div class=\"footer\">";
        NoiDung += "<span><b>CÔNG TY CỔ PHẦN DU LỊCH THANH NIÊN XUNG PHONG - V.Y.C Travel<b></span><br>";
        NoiDung += "<span>Address: 178 - 180 Nguyen Cu Trinh St, 1St Dist, HCMC - VN</span><br>";
        NoiDung += "<span>Website: www.vyctour.com - Email: vyctour@vyctour.com</span><br>";
        NoiDung += "</div>";
        NoiDung += "</div>";
        NoiDung += "</body>";

        NoiDung += "</html>";
        return NoiDung;
    }

    #endregion
}